package com.jingtai.common.webfacade.error;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * Title: ErrorEnum.class
 * Description: 系统错误枚举
 * Create DateTime: 2018/6/13 14:57
 */
@Getter
@AllArgsConstructor
public enum ErrorEnum {

    SUCCESS(1,"成功"),
    FAILED(-1,"失败"),
    UN_KNOWN(2, "未知错误"),
    NOT_FOUND(2, "资源不存在"),
    TOKEN_ERROR(2, "无效的TOKEN"),
    NOT_PARAM(2, "参数不得为空"),
    REQUIRED_PARAM_EMPTY(2, "必填参数为空"),
    COMMON_BUSINESS_ERROR(2, "业务异常"),
    NOT_SUPPORT_REQUEST_METHOD(2, "不支持的请求方式"),
    PHONE_NUMBER_OCCUPY(2, "手机号已被注册"),
    VERIFICATION_ERROR(2, "手机验证码不正确"),
    VERIFICATION_TIMEOUT(2, "手机验证码超时，请重新发送"),
    NUMBER_DUPLICATION(2, "不能重复提交"),
    STATUS_ERROR(2, "状态类型错误"),
    PARAM_ERROR(2, "参数错误"),
    NOT_INVALID_PHONE(2, "无效手机号"),
    NOT_INVALID_PHONE_NAME(2, "暂无此手机号或用户名"),
    ERROR_CODE(2, "验证码错误"),
    TOKEN_INVALID(2, "无效的TOKEN"),
    RE_LOGIN(2, "请重新登录"),
    LOGIN_INFO_ERROR(2, "登录失败"),
    ACCOUNT_STATUS_EXCEPTION(2, "账户状态错误,被禁用"),
    AES_CONVERT_ERROR(2,"Base64转码失败"),
    ERROR_FORMAT_ERROR(2,"ContentType格式错误"),
    API_PERMISSION_INVALID(2,"没有权限访问接口")
    ;


    /**
     * 错误名称
     */
    private int code;

    /**
     * 错误描述
     */
    private String errorDescription;


}
